package com.lin.springcloud.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @Author Created by Lin Weihong
 * @Time on 2021/11/20 23:23
 */
@Configuration
public class ApplicationContextConfig {

    @Bean
//    @LoadBalanced //赋予RestTemplate负载均衡能力，遵循轮询策略
    public RestTemplate getRestTemplate() {
        return new RestTemplate();
    }

}
